package com.sanerzone.smscenter.modules.sms.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sanerzone.jeebase.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

import java.sql.Date;

/**
 * 网关模板管理Entity
 * @author jianr.z
 * @version 2018-04-17
 */
public class SmsTemplateRoute extends DataEntity<SmsTemplateRoute>{
    private static final long serialVersionUID = 1L;
    private String templateContent;		// 内容
    private Date createDatetime;		// 时间
    private String gatewayGroupId;		// 网关组id
    private String type;		// 模板组
    private String gatewayGroupName; //网关组名称

    public SmsTemplateRoute() {
        super();
    }

    public SmsTemplateRoute(String id){
        super(id);
    }

    @Length(min=0, max=255, message="内容长度必须介于 0 和 255 之间")
    public String getTemplateContent() {
        return templateContent;
    }

    public void setTemplateContent(String templateContent) {
        this.templateContent = templateContent;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public java.util.Date getCreateDatetime() {
        return createDatetime;
    }

    public void setCreateDatetime(Date createDatetime) {
        this.createDatetime = createDatetime;
    }

    public String getGatewayGroupId() {
        return gatewayGroupId;
    }

    public void setGatewayGroupId(String gatewayGroupId) {
        this.gatewayGroupId = gatewayGroupId;
    }

    @Length(min=0, max=10, message="模板组长度必须介于 0 和 10 之间")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getGatewayGroupName() {
        return gatewayGroupName;
    }

    public void setGatewayGroupName(String gatewayGroupName) {
        this.gatewayGroupName = gatewayGroupName;
    }
}
